using System;
using System.Web.UI;

namespace Sedna.Core.Controller.Configurations
{
	/// <summary>
	/// Summary description for StringFormatDataGridColumnDataTranslator.
	/// </summary>
	public class StringFormatDataTranslator : IDataTranslator
	{
		private string format = "{0}";

		public string Format
		{
			get { return format; }
			set { format = value; }
		}

		public object Translate(Control control, object value)
		{
			return Translate(control, value, null);
		}

		public object Translate(Control control, object value, Type targetType)
		{
			return String.Format(format, value);
		}
	}
}
